Many of us have seen films containing remarkably realistic dinosaurs, aliens, animated toys and other fanciful creatures. Such animations are made possible by computer graphics. Using such techniques, a computer graphics artist can specify how each object should look and how it should change in appearance over time, and a computer then models the objects and displays them on a display such as your television or a computer screen. The computer takes care of performing the many tasks required to make sure that each part of the displayed image is colored and shaped just right based on the position and orientation of each object in a scene, the direction in which light seems to strike each object, the surface texture of each object, and other factors.
Because computer graphics generation is complex, computer-generated three-dimensional graphics just a few years ago were mostly limited to expensive specialized flight simulators, high-end graphics workstations and supercomputers. The public saw some of the images generated by these computer systems in movies and expensive television advertisements, but most of us couldn't actually interact with the computers doing the graphics generation. All this has changed with the availability of relatively inexpensive 3D graphics platforms such as, for example, the Nintendo 64® and various 3D graphics cards now available for personal computers. It is now possible to interact with exciting 3D animations and simulations on relatively inexpensive computer graphics systems in your home or office.
A problem graphics system designers confronted in the past was to provide a powerful yet inexpensive system which enables various data formats to be stored and processed thereby in a efficient and advantageous manner. Graphics chips used in graphics systems have included a local or on-chip memory for storing data as it is rendered by the graphics pipeline. When data is generated by the graphics chip it is transferred from the local memory to an external memory, where it can be used by, for example, a video interface unit to display the data on a display device. This external memory is typically part of the main memory of the graphics system and is referred to as the external frame buffer (XFB). The processing path of the data between the local memory and the external frame buffer may be referred to as the copy pipeline.
The local memory and the external frame buffer can have a variety of data formats for achieving various functionality in the graphics system. One problem that graphics system designers have faced in the past is to determine what format(s) of data to support in the local memory and the external frame buffer to enable advantageous and efficient use thereof by applications running on the system. Another problem graphics system designers have faced in the past is to find useful and efficient ways in which to maximize the speed, flexibility and overall operation of system. For example, one problem is to determine what elements in the system should be used to perform certain processes or functions and at what time such processes should be performed. Another problem relates to how to best take advantage of processing pipelines, such as the copy pipeline, which has been typically used to transfer data from a local memory of a graphics chip to the main memory of the system.
Various solutions to these problem were offered. For example, graphics systems have used a variety of data formats and have performed conversions between such formats at various points in the graphics processing operation, in an attempt to improve or maximize the overall operation of the system. While some work has been done in the past in connection with such memories, data formats and conversions further improvements are desirable. Specifically, further improvements are desired for high performance, low cost graphics systems, such as home video game systems.
The present invention addresses this problem by providing techniques and arrangements for use in connection with copying out data from an embedded frame buffer to main memory in a graphics system. The invention provides a copy out pipeline which advantageously enables further processing of data and/or data format conversions to be performed “on the fly” during the transfer of the data from the embedded frame buffer to an external destination, such as main memory. The invention further provides a copy pipeline that enables various pixel data formats to be advantageously used in the copy out operation. In addition, the copy pipeline of the invention enables data from the embedded frame buffer to be copied to main memory in a specific format for display or in a variety of texture formats for subsequent use as a texture in a graphics pipeline operation. The copy pipeline of the instant invention is particularly advantageous when used in systems designed for playing interactive 3D video games. In accordance with the instant invention, the embedded frame buffer can be reconfigured to and efficiently used in a variety of modes, including an anti-aliasing mode, a deflicker mode and a YUV (i.e. luma/chroma) mode, thereby increasing the flexibility of the system to support a variety of applications. The desired pixel format for each mode can be selected using, for example, a command to the graphics hardware on which the embedded frame buffer is provided. The copy pipeline can process and selectively further convert data in any of the formats supported by the embedded frame buffer.
In accordance with the invention, the copy pipeline is advantageously used to further process the data from the embedded frame buffer prior to storing the data in the external frame buffer. For example, the copy pipeline can be used to convert the data between a variety of useful formats to, for example, reduce the amount of memory needed to store the data, and/or provide the data in desired format for use in further processing by the graphics system. The copy pipeline can also be used to further process the frame data in a manner that improves the display quality and/or modifies the display characteristics.
In accordance with one aspect provided by the invention, the graphics system, includes an embedded frame buffer and a copy pipeline which transfers data from the embedded frame buffer to an external location, wherein the copy pipeline converts the data from one format to another format prior to writing the data to the external location. The external location may be a display buffer or a texture buffer in the main memory of the graphics system. The copy pipeline converts the data to a display format if the data is transferred to the display buffer and a texture format if the data is transferred to the texture buffer. The graphics pipeline is operable to use the data in the texture buffer during a subsequent rendering process. The copy pipeline selectively reads data from the embedded frame buffer in various RGB color formats or a YUV color format, and writes data to main memory in either a display format or a variety of texture formats.
In accordance with another aspect of the invention, a method of transferring data from a graphics chip to an external destination is provided. The method includes storing image data in an embedded frame buffer of the graphics chip, initiating a copy out operation for transferring data from the embedded frame buffer to the external destination, converting the data from one format to another format during the copy out operation, and writing the converted data to the external destination. The method includes either converting the data to a texture format and writing the texture format data to a texture buffer, or converting the data to a display format and writing the display format data to a display buffer. The copy pipeline is also operable to selectively perform scaling, gamma correction and/or anti-aliasing operations during the copy out process and prior to writing the data to main memory. The converting step includes performing at least one of the following conversions: RGB color format to another RGB color format; YUV color format to another YUV color format; RGB color format to YUV color format; and YUV color format to RGB color format.